package com.cloud.minioService.config;

import com.cloud.minioService.utils.MinioUtil;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author zhozixiong
 * @date 2023/02/27
 */
@Configuration
public class MinioConfig {

    @Value("${minio.endpoint}")
    private  String endpoint;
    @Value("${minio.accessKey}")
    private String accessKey;
    @Value("${minio.secretKey}")
    private String secretKey;

    @Bean
    public MinioUtil minioUtil() {
        return new MinioUtil(endpoint, accessKey, secretKey);
    }
}

